import numpy as np

if __name__ == '__main__':
    mat1 = np.matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    # print(mat1)
    # print(mat1.T)
    # print(mat1 + mat1.T)
    # print(mat1 * 3)
    # print(mat1 * mat1)
    # print(mat1.shape)
    # print(mat1.dtype)
    # print(mat1.itemsize)
    # print(np.matrix([[2, 2], [2, 2]]).std())
    # print(np.matrix([[2, 2], [2, 2]]).mean())
    # print(np.matrix([[2, 2], [26, 2]]).max())
    # print(np.matrix([[2, 2], [2875, 2]]).min())

    # 单位矩阵
    I = np.identity(2)
    print(I,type(I))
    # 逆矩阵
    print(np.linalg.inv(I))
    # 转置矩阵
    print(np.transpose(I))
    # 矩阵乘法
    print(np.dot(I, I))